<template>
  <div class="hello">
    <p>
      这是输入框组件示例界面      
    </p>
    <div>
      <p>默认input</p>
      <vue-input ref="defaultInput1" placeHolder="默认值111" cls="class1" :required="true"></vue-input>
      <vue-input ref="defaultInput2" placeHolder="默认值222" v-model="title"></vue-input>
    </div>
    <button @click="submit()">提交</button>
  </div>
</template>

<script>
import vueInput from '../modules/vue-input.vue'
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      title: '123',
    }
  },
  components: {
    vueInput: vueInput
  },
  methods: {
    submit: function(){
      var defaultValue = '';
      console.log('xxxxx');
      console.log(this.$refs.defaultInput1.getValue());
      console.log(this.$refs.defaultInput2.getValue());
      console.log(this.title);
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
